package com.ruoyi.pcj.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.mashuai.utils.toolkit.core.msCrudbean.annotation.MsCrudBean;
import com.mashuai.utils.toolkit.core.msCrudbean.annotation.MsTbForderField;
import com.mashuai.utils.toolkit.core.msHandlebean.annotation.MsDictSelect;
import com.mashuai.utils.toolkit.core.msHandlebean.annotation.MsSaveCheck;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.pcj.constant.TipConstant;
import lombok.Data;

/**
 * 目标配置对象 pcj_target
 *
 * @author ms
 * @date 2024-03-11
 */
@MsCrudBean(targetParam = "pcjTarget", entityClazz = PcjTarget.class)
@Data
@TableName("pcj_target")
public class PcjTarget extends BaseEntity {
    private static final long serialVersionUID = 1L;


    /**
     * $column.columnComment
     */
    @MsDictSelect(alias = "value")
    @TableId
    @TableField("id")
    private String id;


    /**
     * 删除标志（0代表存在 1代表删除）
     */
    @TableLogic
    @TableField("del_flag")
    private Integer delFlag;


    /**
     * 目标名称
     */
    @MsDictSelect(alias = "label")
    @MsSaveCheck(delFlag = "del_flag = 0 ", errorMsg = TipConstant.NAME_EXIST)
    @TableField("name")
    private String name;


    /**
     * 顺序号
     */
    @MsTbForderField("seq_no")
    @TableField("seq_no")
    private Integer seqNo;


    /**
     * 匹配方式，0-常规，1-特殊
     */
    @TableField("type")
    private String type;

    /**
     * type=1开启，匹配时候关联的目标id
     **/
    @TableField("pid")
    private String pid;

}
